let t = require;
let  e = module
let  o =  e.exports;
 o.default =  e.exports;

                'use strict';
                console.log("start");
                var _n65,
                    i =
                    (this && this.__extends) ||
                    ((_n65 = function n(t, e) {
                            return (_n65 =
                                Object.setPrototypeOf ||
                                ({
                                        __proto__: []
                                    }
                                    instanceof Array &&
                                    function(t, e) {
                                        t.__proto__ = e;
                                    }) ||
                                function(t, e) {
                                    for (var o in e) {
                                        Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                                    }
                                })(t, e);
                        }),
                        function(t, e) {
                            function o() {
                                this.constructor = t;
                            }
                            _n65(t, e),
                                (t.prototype =
                                    null === e ?
                                    Object.create(e) :
                                    ((o.prototype = e.prototype), new o()));
                        });
                Object.defineProperty(o, '__esModule', {
                        value: !0
                    }),
                    (o.CardType2 = void 0);
                var r = t('UIComponent'),
                    a = t('CardMrg'),
                    s = t('AbsInfo'),
                    c = t('CardType2Com'),
                    l = t('ComUtils'),
                    u = (function(t) {
                        function e() {
                            return (null !== t && t.apply(this, arguments)) || this;
                        }
                        return (
                            i(e, t),
                            (e.prototype.onInit = function() {
                                t.prototype.onInit.call(this),
                                    (this.ItemView = this.view.getChildByName('CardItem')),
                                    (this.ItemView.parent = null),
                                    (this._layout = this.view.getChildByName('layout')),
                                    a.CardMrg.ins.on(
                                        s.InfoEvent.StateChanged,
                                        this.onStateChangled,
                                        this
                                    ),
                                    this.onStateChangled();
                            }),
                            (e.prototype.onStateChangled = function() {
                                for (
                                    var t = [],
                                        e = l.default.getComponent(cc.Layout, this._layout),
                                        o = 0; o < a.CardMrg.ins.items.length; o++
                                ) {
                                    (i = a.CardMrg.ins.items[o]).own && !i.isBattle && t.push(i);
                                }
                                var n = Math.max(t.length, this.coms.length);
                                for (o = 0; o < n; o++) {
                                    var i = t[o],
                                        r = this.coms[o];
                                    i && r ?
                                        (r.info = i) :
                                        i ?
                                        ((r = new c.CardType2Com(
                                                cc.instantiate(this.ItemView),
                                                i
                                            )),
                                            this._layout.addChild(r.view),
                                            this.addCom(r)) :
                                        this.removeCom(this.coms[this.coms.length - 1]);
                                }
                                e.updateLayout(),
                                    (e = l.default.getComponent(
                                        cc.Layout,
                                        this.view
                                    )).updateLayout();
                            }),
                            e
                        );
                    })(r.UIComponent);
                (o.CardType2 = u), console.log("end");
            module.exports =  e.exports;